//
//  main.cpp
//  MATH233_iLab1
//
//  Created by Ronald Ram on 1/13/13.
//  Copyright (c) 2013 Ronald Ram. All rights reserved.
//

#include <iostream>
using namespace std;
#include <string>
#include <sstream>

#include "TruthTable.h"

void WelcomeMsg();

int main(int argc, const char * argv[])
{
    //local vars
    bool canQuit = false;
    string shouldQuit, inputP, inputQ, inputR;
    
    TruthTable tmp; //instance with program logic
    WelcomeMsg(); //Welcome msg
    
    do {
        cout << "Enter T/F for p='A is truthful':  ";  cin >> inputP;
        cout << "Enter T/F for q='B is truthful':  ";  cin >> inputQ;
        cout << "Enter T/F for r='C is truthful':  ";  cin >> inputR;
        cout << endl;
        
        tmp.setP(inputP);
        tmp.setQ(inputQ);
        tmp.setR(inputR);
        tmp.LogicGame(); //truth table logic
        
        cout << "\nQuit Program Y/N ? ";  cin >> shouldQuit;
        canQuit = (shouldQuit == "Y" || shouldQuit == "y") ? true : false;
        if (canQuit) cout << "\nThank you - Good Bye!\n" << endl;
    }
    while ( !canQuit);
    
    return 0;
}

void WelcomeMsg()
{
    cout << endl;
    cout << "===================================================" << endl;
    cout << "Welcome to the Truth Table Program" << endl;
    cout << "Class Assignment: MATH 233 - iLab 1" << endl;
    cout << "Author: Ronald Ram" << endl;
    cout << "===================================================" << endl << endl;
}


